package com.poly.system.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.poly.system.domain.SysAppMenuAuth;
import com.poly.system.pojo.dto.SysAppMenuAuthDTO;
import com.poly.system.pojo.query.SysAppMenuAuthQuery;
import com.poly.system.pojo.vo.SysAppMenuAuthVO;

import java.util.List;

/**
 * 应用菜单授权Service接口
 *
 * @author poly
 * @date 2024-01-02
 */
public interface ISysAppMenuAuthService extends IService<SysAppMenuAuth> {
    /**
     * 获取查询对象
     *
     * @param query
     * @return
     */
    LambdaQueryWrapper<SysAppMenuAuth> getWrapper(SysAppMenuAuthQuery query);

    /**
     * 查询APP能力菜单列表
     *
     * @param query
     * @return
     */
    List<SysAppMenuAuthVO> list(SysAppMenuAuthQuery query);

    /**
     * APP能力授权
     *
     * @return
     */
    Boolean auth(SysAppMenuAuthDTO model, Long userId);

    Boolean cancelAuth(List<Long> idList);

    List<Long> getMenuIdListByOrgId(Long orgId, List<Long> roleIdList, Long userId);
}
